-
Notifications
You must be signed in to change notification settings - Fork 57
Debug Info #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Info #86
Conversation
This looks good so far! One small nit: I think |
The operative verb in all of the DI bindings is "create" instead of "build". Should we match LLVM or our IRBuilder? |
So I think the difference is that IRBuilder builds instructions in a scope, while DIBuilder creates types/relationships/metadata that are attached to instructions. So I think |
Sources/LLVM/DIBuilder.swift
Outdated
@@ -362,6 +362,30 @@ public enum DWARFTypeEncoding { | |||
case ucs | |||
|
|||
case ascii | |||
|
|||
static let typeEncodingMapping: [DWARFTypeEncoding: LLVMDWARFTypeEncoding] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this maybe be private
?
Sources/LLVM/DIBuilder.swift
Outdated
} | ||
|
||
/// Create a new descriptor for a parameter variable. | ||
public func createParameterVariable(in scope: Scope, named name: String, at index: UInt32, in file: FileMetadata, at line: Int, type: DIType, _ alwaysPreserve: Bool = true, flags: DebugInfoFlags = .zero) -> VariableMetadata { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make all the indices Ints. Swift stdlib did this too.
8e9c7e3
to
122036c
Compare
0870807
to
b42ddf6
Compare
⛵️ |
No description provided.